:root {
    --nav-height: 48px;
}

.header-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.header {
    max-width: calc(100% - 40px);
    width: auto;
    height: var(--nav-height);
    background: rgba(0, 0, 0, 0.3);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    backdrop-filter: blur(30px) saturate(200%);
    border-radius: 999px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 18px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.6s ease;
    z-index: 0;
}

.header:hover::before {
    left: 100%;
}

.header:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(220, 220, 220, 0.4);
    box-shadow: 0 8px 32px 0 rgba(220, 220, 220, 0.3);
}



.nav-group {
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.nav-links {
    display: none; 
    gap: 8px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    padding: 5px 10px;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 20px;
    position: relative;
    z-index: 1;
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 60%;
}

.logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.logo-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.keeper-brand {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #ffffff;
}

.logo-mark {
    height: 24px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-link:hover .logo-mark {
    transform: scale(1.1);
}

.sign-in-link {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

.install-btn {
    background: rgba(200, 200, 200, 0.9);
    color: #000000;
    border-radius: 999px;
    padding: 10px 20px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    transition: background 0.3s ease;
}

.install-btn:hover {
    background: rgba(220, 220, 220, 1);
}

.language-selector {
    background: rgba(30, 30, 50, 0.8);
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
}

.lang-text {
    color: #ffffff;
    font-size: 12px;
    font-weight: 500;
}

.dropdown {
    position: absolute;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    top: calc(100% + 12px);
    width: max-content;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .36s cubic-bezier(.2,.9,.2,1),transform .36s cubic-bezier(.2,.9,.2,1);
    will-change: opacity,transform;
    z-index: 1002;
    background: rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    border-radius: 16px;
    padding: 12px;
    margin-top: 8px;
}

.dropdown-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.dropdown ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dropdown li {
    margin: 0;
}

.dropdown-item {
    color: var(--text-color);
    text-decoration: none;
    font-size: 15px;
    padding: 10px 16px;
    display: block;
    border-radius: 10px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.dropdown-item:hover::before {
    left: 100%;
}

.dropdown-item:hover {
    background-color: rgba(220, 220, 220, 0.25);
    color: var(--text-color);
    transform: translateX(4px);
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1000;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-nav.open {
    display: flex;
}

.mobile-nav .nav-link {
    font-size: 24px;
    margin: 1rem 0;
}

.mobile-nav-buttons {
    margin-top: 2rem;
}

.btn.login-btn {
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.7);
    color: var(--text-color);
    height: var(--nav-height);
    padding: 0 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    line-height: 1;
}

.btn.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.btn.login-btn:hover::before {
    left: 100%;
}

.btn.login-btn:hover {
    background: rgba(0, 0, 0, 0.7);
    border-color: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.top-right-buttons {
    position: fixed;
    top: 12px;
    right: 24px;
    z-index: 1002;
    display: flex;
    gap: 10px;
    align-items: center;
    height: var(--nav-height);
}

.header .btn.primary {
    display: none;
}

@media (min-width: 901px) {
    .nav-links {
        display: flex;
    }
}

@media (max-width: 900px) {
    .nav-links {
        display: none;
    }
    .hamburger-menu {
        display: flex;
    }
    .header .nav-group .btn.login-btn {
        display: none;
    }
}

@media (max-width: 600px) {
    .header-container {
        padding: 0 10px;
        top: 10px;
    }
    
    .header {
        padding: 8px 16px;
        max-width: calc(100% - 20px);
    }

    .nav-link {
        font-size: 14px;
        padding: 8px 12px;
    }
    
    .logo-mark {
        height: 24px;
    }
    
    .keeper-brand {
        font-size: 12px;
        padding: 6px 12px;
    }
}

.btn.signup-btn {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--text-color);
    height: var(--nav-height);
    padding: 0 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    align-items: center;
    line-height: 1;
}

.btn.signup-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.keeper-logo-link {
    position: fixed;
    top: 12px;
    left: 20px;
    height: var(--nav-height);
    display: inline-flex;
    align-items: center;
    z-index: 1003;
}

.keeper-logo-link img {
    height: 100%;
    width: auto;
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.nav-backdrop.show {
    opacity: 1;
    pointer-events: auto;
}

.dropdown.floating{position:fixed;transform:none;opacity:1;visibility:visible;pointer-events:auto}

.keeper-logo-link img{background:transparent;display:block}

.nav-wave {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.2), rgba(210, 210, 210, 0.8), rgba(255, 255, 255, 0.2));
    transform: scaleX(0);
    transform-origin: center;
    opacity: 0;
    pointer-events: none;
    filter: saturate(140%);
}

.header.show-wave .nav-wave {
    opacity: 1;
}
.keeper-logo-link,
.top-right-buttons{
    scroll-margin-top: calc(var(--nav-height) + 24px);
}

@media (max-width: 900px){
    .keeper-logo-link{display:none}
    .top-right-buttons{display:none}
}
